package com.tuoren.forward.mapper;

import java.util.List;

import com.tuoren.forward.annotation.SqlLimit;
import com.tuoren.forward.entity.Device;
import com.tuoren.forward.entity.dto.DeviceDto;
import com.tuoren.forward.entity.resp.DeviceResp;

@SqlLimit
public interface DeviceMapper {
    int deleteByPrimaryKey(String id);

    int insert(Device row);

    int insertSelective(Device row);

    
    Device selectByPrimaryKey(String id);
    
    @SqlLimit(isWork = false)
    Device selectByMac(String mac);
    
    @SqlLimit(isWork = false)
    Device selectByMacOwner(String mac,String owner);
    
    @SqlLimit(isWork = false)
    Integer existByMacOwner(String mac,String owner);
    
    @SqlLimit(alis = "d")
    List<DeviceResp> select(DeviceDto row);

    int updateByPrimaryKeySelective(Device row);
    
    @SqlLimit(isWork = false)
    int updateByPrimaryKeySelective2(Device row);

    int updateByPrimaryKeyWithBLOBs(Device row);

    int updateByPrimaryKey(Device row);
}